package com.molin.API.test1;

import java.util.Scanner;

public class splitString {
    public static void main(String[] args) {
        //str.split(regex);
        Scanner sc=new Scanner(System.in);
        System.out.println("input stu info: ");
        String stuInfo=sc.nextLine();
        String[] sArr=stuInfo.split(",");
        Student1 stu=new Student1(sArr[0],sArr[1]);
        stu.sout();
    }
}
class Student1{
    private String name;
    private int age;

    public Student1(String name, String age) {
        this.name = name;
        this.age = Integer.parseInt(age);
    }
    public void sout(){
        System.out.println(name+"..."+age);
    }
}